﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Theme_Index_BinderWebClick : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BinderWebClick();
    }
    private void BinderWebClick()
    {
        //访问统计
        //今日在线
        PowerCreator.LMS.Web.DL.Project.TOLearner opLearner = new PowerCreator.LMS.Web.DL.Project.TOLearner();
        PowerCreator.LMS.Web.Course.Resource opResource = new PowerCreator.LMS.Web.Course.Resource();
        PowerCreator.LMS.Web.DL.User.WebLearner opWebLearner = new PowerCreator.LMS.Web.DL.User.WebLearner();
        PowerCreator.LMS.ViewQuery.ViewQuery obj = new PowerCreator.LMS.ViewQuery.ViewQuery();

        //PowerCreator.LMS.Web.User.User opUser = new PowerCreator.LMS.Web.User.User();
        string search = "";
        lbl_LearnerRegistorCount.Text = opLearner.Count(search).ToString();
        lbl_ResourceCount.Text = opResource.QueryResourceCount(search).ToString();
        search = " OnlineuserType=2";
        search = " select distinct FKOnlineuserUserId,OnlineuserLoginIp from TOnlineUser where OnlineuserType=2 and UserOnlineState = 1";
        lbl_OnlineLearnerCount.Text = obj.Count(search).ToString(); //在线学员人数

        search = "select * from TOnlineUser where OnlineuserType=2";
        //lbl_UserToDayHistoryOnline.Text = opWebLearner.QueryOnlineUserCount(search).ToString();  
        lbl_UserToDayHistoryOnline.Text = obj.Count(search).ToString();//访问学习次数
        search = "select * from to_course";
        lbl_UserToDayHistoryOnline02.Text = obj.Count(search).ToString();

    }
}